Add support for embedded Exif-GPS data.
authoroliskoli <oliskoli>
Tue, 22 Apr 2008 21:11:24 +0000 (21:11 +0000)
committeroliskoli <oliskoli>
Tue, 22 Apr 2008 21:11:24 +0000 (21:11 +0000)
exif.c

diff --git a/exif.c b/exif.c
index 514ce928774c5118bb3dc82b6f1423089baa2685..4f2bd781401e5afe7e3347845acbc099d2554ef2 100644 (file)
--- a/exif.c
+++ b/exif.c
@@ -69,6 +69,7 @@ exif_rd_deinit(void)
        gbfclose(fin);
 }
 
+#if 0
 static int
 exif_tag_size(const exif_tag_t *tag)
 {
@@ -88,6 +89,7 @@ exif_tag_size(const exif_tag_t *tag)
        }
        return size * tag->count;
 }
+#endif
 
 static double
 exif_read_double(const gbsize_t offs)
@@ -196,7 +198,6 @@ exif_read_tags(const int ifd)
 
                for (i = 0; i < entries; i++) {
                        exif_tag_t *tag = &tags[i];
-                       int size = exif_tag_size(tag);
                        
                        switch(ifd) {
                                case 0:
@@ -295,6 +296,7 @@ exif_read_tags(const int ifd)
                if ((wpt->latitude == unknown_alt) || (wpt->longitude == unknown_alt)) {
                        warning(MYNAME ": GPSLatitude and/or GPSLongitude not set!\n");
                        waypt_free(wpt);
+                       wpt = NULL;
                        return 0;
                }